// JavaScript Document
var miscelaneasSectionsDivs = new Array();
var miscelaneasSectionsActive = 0;

function miscelaneasInitSectionsDivs(){
	miscelaneasSectionsDivs[0] = document.getElementById('miscelaneas_referencias');
	miscelaneasSectionsDivs[1] = document.getElementById('miscelaneas_gestordir');
}

function miscelaneasChargeSection(section){
	section = parseInt(section);
	if (section == miscelaneasSectionsActive) return;
	if (miscelaneasSectionsDivs.length==0) miscelaneasInitSectionsDivs();		
	switch(section){
		case 0: break; //Referencias
		case 1: //Gestor de direcciones
				if (dinamicIncludes_Map.isGestorDirInclude())
					InitializeGestorDir();
				else
					dinamicIncludes_Map.includeGestorDir();
				break; 
		default: miscelaneasChargeSection(0); return;
	}
	miscelaneasSectionsDivs[miscelaneasSectionsActive].style.display = "none";
	miscelaneasSectionsDivs[section].style.display = "block";
	miscelaneasSectionsActive = section;
}